import './App.css'
import { Layout, Menu } from 'antd'
import { Outlet, NavLink } from 'react-router-dom'
import menus from './common-data/menus.js'
const { Sider, Content } = Layout

function App() {
  return (
    <Layout style={{ height: '100vh' }}>
      <Sider>
        <Menu
          items={menus.map(menu => {
            return {
              key: menu.key,
              label: <NavLink to={menu.key}>{menu.label}</NavLink>,
            }
          })}
          theme="dark"
        />
      </Sider>
      <Layout>
        <Content>
          <Outlet />
        </Content>
      </Layout>
    </Layout>
  )
}

export default App
